export function merge(source, target) {
  const deepObjectMerge = (srcObject, tarObject) => {
    for (var key in tarObject) {
      if (srcObject.hasOwnProperty(key)) {
        if (Object.prototype.toString.call(srcObject[key]) === '[object Object]') {
          deepObjectMerge(srcObject[key], tarObject[key]);
        }
      } else {
        srcObject[key] = tarObject[key]
      }
    }
    return srcObject;
  }
  deepObjectMerge(source, target);
  return source;
}
